﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Clmp.Data.DBEntity
{
    public class Output<T> : IOutput
    {
        private object _value;

        public T GetValue()
        {
            if (_value == null)
                return default(T);
            return (T)_value;
        }

        #region IOutput 成员

        public object Value
        {
            get
            {
                return GetValue();
            }
            set
            {
                _value = value;
            }
        }

        public Type GetValueType()
        {
            return typeof(T);
        }

        #endregion
    }

    public interface IOutput
    {
        object Value { get; set; }
        Type GetValueType();
    }

    /// <summary>
    /// 输出参数信息
    /// </summary>
    class OutputInfo
    {
        public IOutput Output { get; set; }
        public string ParameterName { get; set; }
    }
}
